﻿	      <?php include("../conn.php");
             mysql_query('SET NAMES UTF8'); 

	  

class MyPrizeBean
{
	public $images;
	public $title;
	public $cateid;
	function __construct($images,$title,$cateid)
	{
		$this->images      = $images;
		$this->title      = $title;
		$this->cateid      = $cateid;
		
	}
}






if($_REQUEST['page']!="")
{
$de=$_REQUEST['page']*$_REQUEST['pagesize'];
$size=$_REQUEST['pagesize'];
}

else
{
$de=0;
$size=10;
}



	$rert30=mysql_query("select *from categroy   order by cateid desc limit $de,$size  ");
	
	$prize = array();
	
while($rowf=mysql_fetch_array($rert30))
{
 
			$prize[] = new MyPrizeBean($rowf['images'],$rowf['name'],$rowf['cateid']);
			
}
		
	

echo json_encode($prize);


?>